package com.ctsi.organise.api.impl.local;

import com.ctsi.organise.common.api.RoleServiceProxy;
import com.ctsi.organise.common.model.Person;
import com.ctsi.security.ISecurity;
import com.ctsi.security.domain.SRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @author: zhangjw
 * @Date: 2018/11/13 06:24
 * @Description:
 */
@Service("RoleServiceProxy")
@Primary
public class RoleServiceProxyImpl implements RoleServiceProxy {

    @Autowired
    private ISecurity iSecurity;

    @Override
    public SRole findById(String roleId) {
        return null;
    }

    @Override
    public List<Person> findPersonByOrganAndRole(String organId, String roleId) {
        return null;
    }

    @Override
    public List<String> findPersonIdByOrganAndRole(String organId, String roleId) {
        return null;
    }

    /**
     * 不控制数据权限的取得组织ID内的所有角色
     *
     * @param partyId
     * @return
     */
    @Override
    public List<SRole> getOrganRoles(String partyId) {
        return null;
    }

    /**
     * 不控制数据权限，根据业务类型type以及组织ID获取所有角色
     *
     * @param partyId
     * @param type
     * @return
     */
    @Override
    public List<SRole> getOrganRoles(String partyId, String type) {
        return null;
    }

    /**
     * 获得人员所具有的角色
     *
     * @param partyid
     * @return
     */
    @Override
    public List<SRole> getPersonRoles(String partyid) {
        return Collections.emptyList();
    }

    /**
     * 获取角色成员id
     *
     * @param roleId
     * @return
     */
    @Override
    public List<String> getRoleMember(String roleId) {
        return null;
    }

    /**
     * 获取角色成员对象
     *
     * @param roleId
     * @return
     */
    @Override
    public List<Person> getRoleMemberObj(String roleId) {
        return null;
    }

    @Override
    public List<Integer> saveRolePartyReturnList(String roleId, String[] arrayPartyId, String[] arrayPartyName, String type, boolean event) {
        return null;
    }

    /**
     * 保存角色、party对应对象
     *
     * @param roleId
     * @param partyId
     * @param partyName
     * @param joinWay
     * @param type
     * @param publishEvent
     */
    @Override
    public void saveRoleParty(String roleId, String partyId, String partyName, int joinWay, String type, boolean publishEvent) {

    }

    /**
     * 保存角色下的用户、用户组和组织
     *
     * @param type
     * @param roleId
     * @param arrayPartyId
     * @param arrayPartyName
     * @return
     */
    @Override
    public int saveRolePartyReturnInt(String type, String roleId, String[] arrayPartyId, String[] arrayPartyName) {
        return 0;
    }
}
